import React, { PureComponent } from 'react';
import { Modal, List, InputItem, WhiteSpace, Button, WingBlank, Menu, ActivityIndicator, NavBar, TabBar, Card, Flex,Grid } from 'antd-mobile';
import { connect } from 'dva';
import ast from './index.less';
import md5 from 'md5'
import { setCookie } from '../../utils/auth'
import { createForm, formShape } from 'rc-form';
import { Divider } from 'antd';
const PlaceHolder = ({ className = '', ...restProps }) => (
  <div className={`${className} placeholder`} {...restProps}>Block</div>
);
const data = [{
  icon: '../../assets/icon_02.png',
text: `教学任务`},{
  icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
text: `成绩管理`}]

class TeachingAffair extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      initData: '',
      show: false,
      selectedTab: 'redTab',
      hidden: false,
      fullScreen: false
    };
  }
  onChange = (value) => {
    let label = ''; 
  }
  handleClick = (e) => {
    e.preventDefault(); // Fix event propagation on Android
    this.setState({
      show: !this.state.show,
    });
  }

  onMaskClick = () => {
    this.setState({
      show: false,
    });
  }

  render() {
    const { initData, show } = this.state;
    const loadingEl = (
      <div style={{ width: '100%', height: document.documentElement.clientHeight * 0.6, display: 'flex', justifyContent: 'center' }}>
        <ActivityIndicator size="large" />
      </div>
    );
    return (
      <div className={show ? ast.menu_active : ''}>
        <div><img src={require('../../assets/banner.jpg')} className={ast.banner} /></div>
        <Grid data={data} columnNum={3} renderItem={dataItem => (
        <div style={{ padding: '12.5px' }}>
          <img src={dataItem.icon} style={{ width: '45px', height: '45px' }} alt="" />
          <div style={{ color: '#888', fontSize: '14px', marginTop: '12px' }}>
            <span>{dataItem.text}</span>
          </div>
        </div>
      )} />
      </div>
      
    );
  }
}
export default TeachingAffair;
